import service from "../utils/request";

//  宿主机列表
export function getHostList(params:any) {
  return service.get(`/host`, { params });
}
export function createHostList(data:any) {
  return service.post(`/host`, data);
}
export function editHostList(id:number,data:any) {
  return service.put(`/host/${id}`,data);
}
export function deleteHostList(id:number) {
  return service.delete(`/host/${id}`);
}
export function getHostListDetail(id:number) {
  return service.get(`/host/${id}`);
}
export function enable(id:number) {
  return service.put(`/host/${id}/enable`);
}
export function sync(id:number) {
  return service.put(`/host/${id}/sync`);
}
//  vm列表
export function byHostToVmList(params:any,id:number) {
  return service.get(`/host/${id}/vm`, { params });
}